﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Itfort;
using Itfort.Web;

namespace WanPiJie.WebSite.MyBaby
{
	public partial class AddBaby_f : PageMustLogin_Baby
	{
		protected void Page_Load(object sender, EventArgs e)
		{
		}

		protected void BtnOK_Click(object sender, EventArgs e)
		{
			if (this.HasBaby)
			{
				return;
			}

			try
			{
				string name = Request.Form["f_Name"];
				DateTime birthday = Request.ToDateTime("f_Birthday");
				string gender = Request.Form["f_Gender"];

				Baby baby = WpjSf.BabyService.AddBaby(this.LoginUser.Id, name, birthday, gender);
				Response.Redirect("AddGrowthRecord-f.aspx?babyid=" + baby.Id + "&from=addbaby");
			}
			catch
			{

			}
		}
	}
}